---
apiVersion: v1
kind: Service
metadata:
  name: storm-ui
  namespace: spark-cluster
spec:
  type: NodePort
  ports:
  - name: ui 
    port: 8080
    targetPort: 8080
    nodePort: 30180
  - name: ssh
    port: 22
    targetPort: 22
  selector:
    name: storm-ui

---
apiVersion: v1
kind: ReplicationController
metadata:
  name: storm-ui
  namespace: spark-cluster
spec:
  replicas: 1
  template:
    metadata:
      labels:
        name: storm-ui
    spec:
      containers:
      - name: storm-ui
        image: index.tenxcloud.com/zhangshun/storm-ui:1.0.2
        ports:
        - containerPort: 8080

        env:
        - name: ZOOKEEPER_SERVICE_HOST
          value: kafka-zoo-svc
        - name: NIMBUS_SERVICE_HOST
          value: storm-nimbus

        resources:
          limits:
            cpu: 100m

